<template>
    <div>
        <mt-header title="系统管理员">
            <router-link to="/addhome" slot="left">
                <i class="mintui mintui-back lic-d"></i>
            </router-link>
        </mt-header>
        <div class="par">
            <div class="par-a">
                <p>
                    ID:<span>{{selectagentdata.agentID}}</span>
                </p>
                <p>
                    当前房卡：<span>{{selectagentdata.gems}}</span>
                </p>
                <p>
                    支付宝：<span>{{selectagentdata.alipay}}</span>
                </p>
            </div>
            <div class="par-b">
                <p>
                    积累下级：<span>{{count}}</span>
                </p>
                <p>
                    积累房卡：<span>{{sumGems}}</span>
                </p>
                <p>
                    微信：<span>{{selectagentdata.wechat}}</span>
                </p>
            </div>
        </div>
    </div>
</template>

<script>
    import {
        selectagent
    } from '../api/api'
    export default {
        data() {
            return {
                selectagentdata: {},
                id: this.$route.params.id,
                count: '',
                sumGems: ''
            }
        },
        created() {
            this.getselectagent()
        },
        methods: {
            getselectagent() {
                selectagent(this.id).then(res => {
                    if (res.data.code == 0) {
                        console.log(res.data);
                        this.selectagentdata = res.data.data;
                        this.count = res.data.count;
                        this.sumGems = res.data.sumGems;
                    }
                })
            }
        }
    }
</script>


<style lang="less" scoped>
    a {
        text-decoration: none;
    }
    .lic-d {
        font-size: 50px;
    }
    .mint-header {
        background: -webkit-linear-gradient(left, #6180F4, #79CBFA);
        font-size: 36px;
        height: 80px;
    }
    .par {
        width: 95%;
        height: 190px;
        margin-top: 80px;
        background-color: #F5F5F5;
        margin-left: 16px;
        border: 2px solid #cccccc;
        border-radius: 10px;
        p {
            padding: 0;
            margin: 0;
            font-size: 28px;
            margin-top: 10px;
        }
        .par-a {
            float: left;
            padding: 10px 30px 0;
        }
        .par-b {
            float: right;
            padding: 10px 30px 0;
        }
    }
</style>
